
#ifndef _Oz_Webui_IAbstractApplication_H_
#define _Oz_Webui_IAbstractApplication_H_

/**
 * Author: pepone.onrez@gmail.com
 * Date: 18-January-2008
 * License: GPL-V3
 * Copyright: pepone.onrez@gmail.com (2008)
 **/

#include <Oz/Webui/Webui.h>
#include <Oz/Webui/IRequestCycle.h>

namespace Oz{
    namespace Webui{
        /**
         * This class define the interface for talk with the application object.
         **/
        class IAbstractApplication : public IRequestCycle{
            public:
            virtual ~IAbstractApplication();
            /**
             * This method give access to the session interface.
             **/
            virtual IAbstractSessionPtr session() = 0;

            /**
             * This method permite set the main view for the application.
             **/
            virtual void setMainView(const IAbstractViewPtr& view) = 0;

            virtual Oz::IRequestPtr getRequest()const = 0;

           /**
            * Permite acceder al objeto response.
            **/
            virtual Oz::IResponsePtr getResponse()const = 0;

           /**
            * Este metodo se encarga de procesar un request.
            **/
            virtual Oz::IResponsePtr processRequest(const Oz::IRequestPtr& request) = 0;

            protected:
            IAbstractApplication();
            IAbstractApplication& operator=(const IAbstractApplication& rhs);
        };
    }
}
#endif
